package com.hospital.controller;

import com.hospital.entity.Employee;
import com.hospital.entity.Job;
import com.hospital.service.intf.JobService;
import com.hospital.vo.PageBean;
import com.hospital.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/job")
public class JobController {

    @Autowired
    private JobService jobService;

    @RequestMapping("/add.do")
    public R add(Job job){
        return jobService.add(job);
    }

    @RequestMapping("/delete.do")
    public R delete(Integer id){
        return jobService.delete(id);
    }

    @RequestMapping("/update.do")
    public R update(Job job){
        return jobService.update(job);
    }

    @RequestMapping("/select.do")
    public R select(){
        return jobService.select();
    }

    @RequestMapping("/selectPage.do")
    public PageBean selectPage(String job_name, int page, int limit){
        return jobService.selectPage(job_name, page, limit);
    }

}
